import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect:'/login'
  },
  {
    path: '/login',
    name: '登录',
    component: () => import('../views/login')
  },
  {
    path: '/home',
    name: '主页',
    component: () => import('../views/home'),
    redirect:'/home/1xwzx',
    children:[
      {
        path: '1xwzx',
        name: '新闻资讯',
        component: () => import('../views/1xwzx'),
      },
      {
        path: '2jrwm',
        name: '加入我们', 
        component: () => import('../views/2jrwm'),
      },
      {
        path: '3gwpz',
        name: '官网配置',
        component: () => import('../views/3gwpz'),
      },
      {
        path: '4lcgl',
        name: '历程管理',
        component: () => import('../views/4lcgl'),
      },
      {
        path: '5cpfa',
        name: '产品方案',
        component: () => import('../views/5cpfa'),
      },
      {
        path: '6hzhb',
        name: '合作伙伴',
        component: () => import('../views/6hzhb'),
      },
      {
        path: '7gywm',
        name: '关于我们',
        component: () => import('../views/7gywm'),
      },
      {
        path: '8lbtgl',
        name: '轮播图管理',
        component: () => import('../views/8lbtgl'),
      },
    ]
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
